import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'

//首页

//查询用户手机号
export const LoginUserInfo =
  () =>
    postAction(
      '/zx/usermgr/queryLoginUserInfo',
    )

/**
 * 获取登录人信息
 * @returns
 */
  export  const queryLoginUser = ()=>{
    return getAction('/qsb/channel/queryLoginUser')
  }

/**
 * 渠道新增子账号
 * @param {*} data
 * @returns
 */
export const addChannelSubAcc = (data)=>{
  return postAction('/qsb/channel/info/addChannelSubAcc',data)
}

/**
 * 渠道删除子账号
 * @param {*} data
 * @returns
 */
export const delChannelSubAcc = (data)=>{
  return postAction('/qsb/channel/info/delChannelSubAcc',data)
}

/**
 * 渠道子账号列表查询
 * @returns
 */
export const queryChannelSubList = ()=>{
  return getAction('/qsb/channel/info/queryChannelSubList')
}


//修改登录密码
export const changeLoginPwd =
  (data) =>
    postAction(
      '/zx/usermgr/updateLoginPwd',
      data
    )
//修改支付密码发送验证码
export const getSendSMSByLogin =
  (data) =>
    postAction(
      '/zx/usermgr/sendSMSByLogin',
      data
    )

//渠道法人信息查询
export const getLegalList =
  (data) =>
    postAction(
      '/legal/legalList',
      data
    )

// 修改法人实名手机号
export const getUpdateLegalPhone =
  (data) =>
    postAction(
      '/legal/updateLegalPhone',
      data
    )

//入驻信息---获取渠道入驻进度信息
export const getChannelProgress =
  () =>
    getAction(
      '/progress/queryChannelProgress',
      {}
    )
//获取用户的待审核合同信息
export const getCheckAgreeInfo =
  () =>
    getAction(
      '/qsb/channel/info/getWaitCheckAgreeInfo',
      {}
    )


//获取登录首页统计数据
export const getIndexStatistics =
  () =>
    getAction(
      '/ent/mgr/queryEntIndex',
      {}
    )




//消息通知
export const queryMsgList =
  (data) =>
    postAction(
      '/msg/mgr/queryMsgList',
      data
    )
//消息读取状态
export const queryReadMsg =
  (data) =>
    postAction(
      '/msg/mgr/readMsg',
      data
    )
//全部标记为已读
export const querySetRead =
  (data) =>
    postAction(
      '/msg/mgr/readMsgAll',
      data
    )
//消息未读总数
export const readUnreadTotal =
  (data) =>
    postAction(
      '/msg/mgr/queryUnreadTotal',
      data
    )

//我的合同列表
export const getContractList =
  (data) =>
    postAction(
      '/qsb/channel/info/agreeListByChannelId',
      data
    )

//合同详情
export const getContractDetails =
  (data) =>
    getAction(
      '/agreeInfo/detail?id=' + data,
    )

//发起申诉
export const getAgreeAppeal =
  (data) =>
    postAction(
      '/agree/abort/agreeAbortAppeal',
      data
    )

//客户端发起续签申请 通知站内信给运营/法务
export const getAgreeApplication =
  (data) =>
    getAction(
      '/agree/integrated/agreeRenewalApplication?agreeId='+ data
    )

//合同列表---下载
export const getContractDownload =
  (data) =>
    putAction(
      '/agreeInfo/agreeDownload?id=' + data,
    )
